package us.wili.dev.client.model.rsp;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import us.wili.dev.common.model.IdLongToStrSerializer;
import us.wili.dev.model.entity.User;

public class AboutMeRsp {
    @ApiModelProperty(value="用户id")
    @JSONField(serializeUsing = IdLongToStrSerializer.class)
    private Long userid;

    @ApiModelProperty(value="用户名字")
    private String name;

    @ApiModelProperty(value="用户头像")
    private String headImgUrl;

    @ApiModelProperty(value="用户手机")
    private String phone;

    public static AboutMeRsp ToAboutMe(User user){
        AboutMeRsp rsp =new AboutMeRsp();
        rsp.setHeadImgUrl(user.getHeadImgUrl());
        rsp.setName(user.getName());
        rsp.setPhone(user.getPhone());
        return rsp;
    }

    public Long getUserid() {
        return userid;
    }

    public void setUserid(Long userid) {
        this.userid = userid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getHeadImgUrl() {
        return headImgUrl;
    }

    public void setHeadImgUrl(String headImgUrl) {
        this.headImgUrl = headImgUrl;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }
}
